import request from '@/utils/request'

/**
 * 获取任务列表
 * @param {object} options {businessId,businessType,result,page,rows}
 */
export function getTaskList(options) {
  return request({
    url: '/mg/SystemTask/GetList',
    method: 'get',
    params:options
  })
}

/**
 * 重启任务
 * @param {object} options {id}
 */
export function restartTask(options) {
    return request({
      url: '/mg/SystemTask/RestartTask',
      method: 'get',
      params:options
    })
  }

 /**
 * 查询任务的redis状态
 * @param {object} options {id}
 */
export function getRedisState(options) {
    return request({
      url: '/mg/SystemTask/GetTaskRedisState',
      method: 'get',
      params:options
    })
  }

 /**
 * 同步键值到Redis中
 * @param {object} options {id}
 */
export function syncRedisKey(options) {
  return request({
    url: '/mg/SystemTask/SyncTaskRedisKey',
    method: 'get',
    params:options
  })
}